package cn.edu.scnu.thewonderofink.logic.network

import cn.edu.scnu.thewonderofink.logic.model.RecognitionResponse

object RecognitionNetwork {
    private val recognitionService = ServiceCreator.create()

    private lateinit var _response : RecognitionResponse

    fun sendImage(image: String) = recognitionService.send(image)

    fun setResponse(response: RecognitionResponse) {
        _response = response
    }
    fun getResponse() : RecognitionResponse = _response

    fun close() = ServiceCreator.shutdown()
}